Java Server Pages (JSP).sublime-syntax (3164B)
1 %YAML 1.2 2 --- 3 # http://www.sublimetext.com/docs/3/syntax.html 4 name: Java Server Page (JSP) 5 file_extensions: 6 - jsp 7 scope: text.html.jsp 8 contexts: 9 main: 10 - match: <%-- 11 scope: punctuation.definition.comment.jsp 12 push: 13 - meta_scope: comment.block.jsp 14 - match: "--%>" 15 scope: punctuation.definition.comment.jsp 16 pop: true 17 - match: <%@ 18 scope: punctuation.section.directive.jsp 19 push: 20 - meta_scope: meta.directive.jsp 21 - match: "%>" 22 scope: punctuation.section.directive.jsp 23 pop: true 24 - match: \w+ 25 scope: keyword.other.directive.jsp 26 push: 27 - match: \w+ 28 scope: constant.other.directive.attribute.jsp 29 - match: "=" 30 scope: keyword.operator.assignment.jsp 31 - match: '"' 32 scope: punctuation.definition.string.begin.jsp 33 push: 34 - meta_scope: string.quoted.double.jsp 35 - match: '"' 36 scope: punctuation.definition.string.end.jsp 37 pop: true 38 - match: \\. 39 scope: constant.character.escape.jsp 40 - match: "'" 41 scope: punctuation.definition.string.begin.jsp 42 push: 43 - meta_scope: string.quoted.single.jsp 44 - match: "'" 45 scope: punctuation.definition.string.end.jsp 46 pop: true 47 - match: \\. 48 scope: constant.character.escape.jsp 49 - match: '(?=\S)' 50 pop: true 51 - match: "(<%[!=]?)|(<jsp:scriptlet>|<jsp:expression>|<jsp:declaration>)" 52 captures: 53 1: punctuation.section.embedded.begin.jsp 54 2: meta.tag.block.jsp 55 push: 56 - match: (</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>)|(%>) 57 captures: 58 1: meta.tag.block.jsp 59 2: punctuation.section.embedded.end.jsp 60 pop: true 61 - match: '(?<!\n)(?!</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>|%>|\{|\})' 62 push: 63 - meta_scope: source.java.embedded.html 64 - match: '(?=</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>|%>|\{|\})|\n' 65 pop: true 66 - include: scope:source.java 67 - match: "{" 68 push: 69 - match: "}" 70 pop: true 71 - match: (</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>)|(%>) 72 captures: 73 1: meta.tag.block.jsp 74 2: punctuation.section.embedded.end.jsp 75 push: 76 - match: "(<jsp:scriptlet>|<jsp:expression>|<jsp:declaration>)|(<%(?!--)[!=]?)" 77 captures: 78 1: meta.tag.block.jsp 79 2: punctuation.section.embedded.begin.jsp 80 pop: true 81 - include: scope:text.html.jsp 82 - include: scope:source.java 83 # Prevent stray brace detection since brace matching won't work with 84 # %> pop pattern 85 - match: "}" 86 - include: scope:source.java 87 - include: scope:text.html.basic